package com.shen.pojo.QQ;

/**
 * Author:shen
 * CreateDate:2020/5/5.
 * Function:
 */
public class Level {
    private int crown=0;//用户皇冠
    private int sun=0;//用户太阳
    private int star=0;//用户星星

    public void getUp(int onlineTime){
        for(int i=100;i<=onlineTime;i+=100){

                this.star++;
                if(this.star==3){
                    this.sun++;
                    this.star=0;
                }
                if (this.sun==3){
                    this.crown++;
                    this.sun=0;
                }

        }
    }

    public Level() {
    }

    public Level(int crown, int sun, int star) {
        this.crown = crown;
        this.sun = sun;
        this.star = star;
    }

    public int getCrown() {
        return crown;
    }

    public void setCrown(int crown) {
        this.crown = crown;
    }

    public int getSun() {
        return sun;
    }

    public void setSun(int sun) {
        this.sun = sun;
    }

    public int getStar() {
        return star;
    }

    public void setStar(int star) {
        this.star = star;
    }

    @Override
    public String toString() {
        return "Level{" +
                "crown=" + crown +
                ", sun=" + sun +
                ", star=" + star +
                '}';
    }
}
